#pragma once
#include "Sphere.h"
#include "Triangle.h"
#include "Plane.h"
#include "OutImage.h"
#include "Scene.h"
#include "../Rasterizer/TgaBuffer.h"

class CCamera
{

protected:
	CVector			*m_Position;
	CVector			*m_Target;
	CVector			*m_Up;
	float			m_NearPlane;
	float			m_FarPlane;
	float			m_Fov;
	COutImage		*m_ViewPlane;
	float			m_PixelWidth;
	float			m_PixelHeight;
	CScene			*m_Scene;

protected:
	void			CountPixelDimensions();

public:
	CCamera(void);
	CCamera(CVector, CVector);
	CCamera(CVector, CVector, CVector, float, float, float);
	virtual ~CCamera(void);

	CVector*		GetPosition() { return m_Position; }
	CVector*		GetTarget() { return m_Target; }
	CVector*		GetUp() { return m_Up; }
	float			GetNearPlane() { return m_NearPlane; }
	float			GetFarPlane() { return m_FarPlane; }
	float			GetFov() { return m_Fov; }
	CScene			*GetScene() { return m_Scene; }
	void			SetPosition(CVector _pos) { m_Position = new CVector(_pos); };
	void			SetTarget(CVector _tgt) { m_Target = new CVector(_tgt); };
	void			SetUp(CVector _up) { m_Up = new CVector(_up); };
	void			SetNearPlane(float _near) { m_NearPlane = _near; }
	void			SetFarPlane(float _far) { m_FarPlane = _far; }
	void			SetFov(float _fov) { m_Fov = _fov; }
	void			SetScene(CScene *_scene) { m_Scene = _scene; }
	virtual	void	Render() = 0;
	void			SetViewPlane(int, int);
};

